﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="menutest.aspx.cs" Inherits="Menu_menutest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <link href="../Styles/accounts.css" rel="stylesheet" type="text/css" />    
    <link href="js/sdmenu.css" rel="stylesheet" type="text/css" />
    <link href="js/anylinkmenu.css" rel="stylesheet" type="text/css" />
</head>

 <body style=" background-color:#505050; background-image:url('../Images/b1.jpg'); background-repeat:repeat-x; width:100%; margin:0px; padding:0;">  
   <form id="form1" runat="server">
   <asp:GridView ID="GridView1" runat="server">
   </asp:GridView>
    <div style="padding-top:40px; padding-left:10px;">
        <div style="border:1px solid #9e9e9e;overflow:auto; height:450px;">
         <div id="my_menu" class="sdmenu" >
             <asp:Repeater id="ParentRepeater" runat="server" OnItemDataBound="ParentRepeater_ItemDataBound">            
                <ItemTemplate>
                  <div>
                    <span>
                     <%# Eval("text")%>
                    </span>
                     <%-- adding one more repeater within this item template --%>
                    <asp:Repeater id="ChildRepeater" runat="server"> 
                     <ItemTemplate>
                        <asp:HyperLink CssClass="menuanchorclass" ID="hy1" runat="server" Text='<%# Eval("text")%>' NavigateUrl="#" Target="contentframe"></asp:HyperLink>
                        <script language="javascript" type="text/javascript">
                            var anylinkmenu<%=++j%> = { divclass: 'anylinkmenu', inlinestyle: 'width:120px; background:#636363;', linktarget: '_new'} //Second menu variable. Same precaution.
                            anylinkmenu<%=j%>.items = [
	                                ["Add New", '<%#ResolveUrl(Eval("urladdnew").ToString())%>'],
	                                ["View", '<%#ResolveUrl(Eval("urlView").ToString())%>']
                                ];

                        </script>
                    </ItemTemplate>
                    </asp:Repeater>
                  </div>
                </ItemTemplate>
            </asp:Repeater>      
         </div>                  
         </div>
       </div>
      <script src="js/sdmenu.js" type="text/javascript"></script>
      <script src="js/anylinkmenu.js" type="text/javascript"></script>
      <script src="js/menucontents.js" type="text/javascript"></script>
      <script type="text/javascript">
         // <![CDATA[
         var myMenu;
         function initsdmenu() {
             myMenu = new SDMenu("my_menu");
             myMenu.init();
             myMenu.collapseAll();
         };
         function loadfunc() {
             try {
                 initsdmenu();
             }
             catch (Error) {
             }
          }
         window.onload = loadfunc;
         // ]]>
         anylinkmenu.init("menuanchorclass");
	</script>	
   </form>
</body>
</html>
